func runtime.addExitHook

one use

	runtime (current package)
		exithook.go#L19: func addExitHook(f func(), runOnNonZeroExit bool) {